let bottomLeft = document.querySelector('.bottom-left')
let bottomsLeft = echarts.init(bottomLeft)
let data  = [
    [
      [29550, 79.1, 15565, 'Japan', 1990],
      [2076, 67.9, 355121, 'North Korea', 1990],
      [12087, 72, 131565, 'South Korea', 1990],
      [24021, 75.4, 5454, 'New Zealand', 1990],
      [43296, 76.8, 5455445, 'Norway', 1990],
      [10088, 70.8, 15311321, 'Poland', 1990],
      [19349, 69.6, 56545444, 'Russia', 1990],
      [10670, 67.3, 687853, 'Turkey', 1990],
      [26424, 75.7, 123156, 'United Kingdom', 1990],
      [37062, 75.4, 8545488, 'United States', 1990]
    ],
    [
      [36162, 83.5, 5465121, 'Japan', 2015],
      [1390, 71.4, 2131356, 'North Korea', 2015],
      [34644, 80.7, 3212154, 'South Korea', 2015],
      [34186, 80.6, 45454, 'New Zealand', 2015],
      [64304, 81.6, 5210967, 'Norway', 2015],
      [24787, 77.3, 38611794, 'Poland', 2015],
      [23038, 73.13, 143456918, 'Russia', 2015],
      [19360, 76.5, 78665830, 'Turkey', 2015],
      [38225, 81.4, 64715810, 'United Kingdom', 2015],
    ]
  ];
  let bottomL = {
    
    legend: {
      right: '10%',
      top: '3%',
      data: ['1990', '2015']
    },
    grid: {
      left: '10%',
      top: '18%',
      bottom: '18%',
      right: '10%'
    },
    xAxis: {
      splitLine: {
        lineStyle: {
        //   type: 'dashed'
        }
      }
    },
    yAxis: {
      splitLine: {
        lineStyle: {
        //   type: 'dashed'
        }
      },
      scale: true
    },
    series: [
      {
        name: '1990',
        data: data[0],
        type: 'scatter',
        symbolSize: function (data) {
          return Math.sqrt(data[2]) / 5e2;
        },
        emphasis: {
          focus: 'series',
          label: {
            show: true,
            formatter: function (param) {
              return param.data[3];
            },
            position: 'top'
          }
        },
        itemStyle: {
          shadowBlur: 10,
          shadowColor: 'rgba(120, 36, 50, 0.5)',
          shadowOffsetY: 5,
          color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [
            {
              offset: 0,
              color: 'rgb(251, 118, 123)'
            },
            {
              offset: 1,
              color: 'rgb(204, 46, 72)'
            }
          ])
        }
      },
      {
        name: '2015',
        data: data[1],
        type: 'scatter',
        symbolSize: function (data) {
          return Math.sqrt(data[2]) / 5e2;
        },
        emphasis: {
          focus: 'series',
          label: {
            show: true,
            formatter: function (param) {
              return param.data[3];
            },
            position: 'top'
          }
        },
        itemStyle: {
          shadowBlur: 10,
          shadowColor: 'rgba(25, 100, 150, 0.5)',
          shadowOffsetY: 5,
          color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [
            {
              offset: 0,
              color: 'rgb(129, 227, 238)'
            },
            {
              offset: 1,
              color: 'rgb(25, 183, 207)'
            }
          ])
        }
      }
    ]
  };
  bottomsLeft.setOption(bottomL)